package com.nineclock.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.dto.SysCompanyDTO;
import com.nineclock.pojo.SysCompany;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysCompanyMapper extends BaseMapper<SysCompany> {
    @Select("select * from sys_company where id in(select company_id FROM sys_company_user where user_id = #{userId})")
    public List<SysCompany> findCompanyByUserId(Long userId);
}
